﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Clinica/MasterPageHospitalizacion.master" AutoEventWireup="true" CodeFile="wfCamaListado.aspx.cs" Inherits="Ventas_wfCamaListado" %>

<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMenuSecundario" Runat="Server">
    <li><a href="wfCamaListado.aspx" class="active">Cama</a></li>
    <li><a href="wfAdmisionHospitalizacionListado.aspx" class="">Admisión Hospitalización</a></li>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ModuleTitleContent" Runat="Server">
    Cama
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentEnlacesRapidos" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MainContent" Runat="Server">
    <ul class="tabs primary">
        <li class="active"><a href="wfCamaListado.aspx">Listado de Camas</a></li>
        <li><a href="wfCama.aspx" class="">Registrar Cama</a></li>
    </ul>
    <h4>Listado de Camas</h4>
    <script language="javascript" type="text/javascript">
            function confirmSubmit() {pcEliminar.Show();}
            function confirmSubmitResult() { $('#<%= btnEliminar.ClientID %>').click(); }    
    </script>
    <script type="text/javascript">
        function ShowMensaje() { pc_Mensaje.Show(); }
    </script>
    <table width="99%">
        <tr>
            <td>
                <dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="99%">
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                            <table>
                                <tr>
                                    <td>
                                        <dx:ASPxButton ID="btnAgregarCama" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" AutoPostBack="false"
                                            Text="Agregar" OnClick="AgregarCama">
                                        </dx:ASPxButton>
                                    </td>
                                    <td>
                                        <dx:ASPxButton ID="btnModificarCama" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" AutoPostBack="false"
                                            Text="Modificar" OnClick="ModificarCama">
                                        </dx:ASPxButton>
                                    </td>
                                    <td>
                                        <dx:ASPxButton ID="btnElimina" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Text="Eliminar" AutoPostBack="false">                                          
                                            <ClientSideEvents Click="function(s, e) {return confirmSubmit();}" />                                 
                                        </dx:ASPxButton>
                                    </td>
                                    <td>
                                        <asp:Button ID="btnEliminar" runat="server" Style="display: none;" Text="Eliminar" OnClick="EliminarCama" AutoPostBack="false"/>
                                    </td>
                                </tr>
                            </table>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxPanel>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxGridView ID="dgvListadoCamas" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                    CssPostfix="PlasticBlue" Width="99%" AutoGenerateColumns="False" 
                    KeyFieldName="idCama" onpageindexchanged="dgvListadoCamas_PageIndexChanged">
                    <Columns>
                        <dx:GridViewDataTextColumn Caption="IdCama" VisibleIndex="0" FieldName="idCama" Visible="false"></dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Codigo" VisibleIndex="1" FieldName="CAM_CODIGO"></dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Tipo Servicio" VisibleIndex="2" FieldName="tipoServicio"></dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Tipo Cama" VisibleIndex="3" FieldName="tipoCama"></dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Servicio Propietario" VisibleIndex="4" FieldName="servicioPropietario"></dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Ubicación Actual" VisibleIndex="5" FieldName="UbicActual"></dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Estado" VisibleIndex="6" FieldName="estadoCama"></dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowFocusedRow="True" />
                    <SettingsPager ShowDefaultImages="False">
                        <AllButton Text="All"></AllButton>
                        <NextPageButton Text="Next &gt;"></NextPageButton>
                        <PrevPageButton Text="&lt; Prev"></PrevPageButton>
                    </SettingsPager>
                    <Images SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/PlasticBlue/GridView/gvLoadingOnStatusBar.gif"></LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/PlasticBlue/GridView/Loading.gif"></LoadingPanel>
                    </Images>
                    <ImagesFilterControl><LoadingPanel Url="~/App_Themes/PlasticBlue/Editors/Loading.gif"></LoadingPanel></ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue">
                        <Header ImageSpacing="10px" SortingImageSpacing="10px"></Header>
                    </Styles>
                    <StylesEditors>
                        <CalendarHeader Spacing="11px"></CalendarHeader>
                        <ProgressBar Height="25px"></ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxPopupControl ID="pcMensaje" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" Modal="True" 
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="420px" 
                    AllowDragging="True" AllowResize="True" ClientInstanceName="pcMensaje" DragElement="Window" HeaderText="Mensaje">
                    <HeaderImage Url="~/Imagenes/iconError.png"></HeaderImage>
                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif"></LoadingPanelImage>
                    <CloseButtonStyle><Paddings Padding="0px" /></CloseButtonStyle>
                    <ContentStyle><BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" /></ContentStyle>
                    <HeaderStyle><Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" PaddingTop="4px" /></HeaderStyle>
                    <ContentCollection>
                        <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                            <table width="100%">
                                <tr>
                                    <td style="padding:0 0 0 20px;"  align="center">
                                        <dx:ASPxLabel ID="lblMensaje" runat="server" /><hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Text="Aceptar" Checked="True">
                                            <ClientSideEvents Click="function(s, e) {pcMensaje.Hide();}"/>
                                            <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Italic="False" Font-Names="Georgia" Font-Strikeout="False" ForeColor="White"></CheckedStyle>
                                            <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" ForeColor="White"></HoverStyle>
                                        </dx:ASPxButton>                
                                    </td>
                                </tr>
                            </table>
                        </dx:PopupControlContentControl>
                    </ContentCollection>
                </dx:ASPxPopupControl>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxPopupControl ID="pcEliminar" runat="server" Width="350px" AllowDragging="True" AllowResize="True" ClientInstanceName="pcEliminar" 
                    CloseAction="CloseButton" HeaderText="Eliminar" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" DragElement="Window">
                
                    <HeaderImage Url="~/Imagenes/delete2.png" Width="20px"></HeaderImage>
                    <HeaderStyle Font-Bold="True" BackColor="#3D5294" ForeColor="White" />

                    <ContentCollection>
                        <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                            <table width="100%">
                                <tr>
                                    <td colspan="2" style="padding: 0 0 0 20px;">
                                        ¿Está Seguro De Querer Eliminar La Cama?<hr /></td>
                                </tr>
                                <tr>
                                    <td align="right" style="padding: 0 20px 0 0;">                
                                        <dx:ASPxButton ID="btnAceptarEliminar" runat="server" AutoPostBack="False" ClientIDMode="AutoID" Text="Aceptar" Checked="True">
                                             <ClientSideEvents Click="function(s, e) {pcEliminar.Hide();confirmSubmitResult();}" />
                                            <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" ForeColor="White"></CheckedStyle>
                                            <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" ForeColor="White"></HoverStyle>
                                        </dx:ASPxButton>            
                                    </td>
                                    <td align="left" style="padding: 0 0 0 20px;">            
                                        <dx:ASPxButton ID="btnCancelarEliminar" runat="server" AutoPostBack="False" ClientIDMode="AutoID" Text="Cancelar" Checked="True">
                                            <ClientSideEvents Click="function(s, e) {pcEliminar.Hide();}" />
                                            <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" ForeColor="White"></CheckedStyle>
                                            <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" ForeColor="White"></HoverStyle>
                                        </dx:ASPxButton>            
                                    </td>
                                </tr>
                            </table>
                        </dx:PopupControlContentControl>
                    </ContentCollection>
                </dx:ASPxPopupControl>
            </td>
        </tr>
    </table>
</asp:Content>

